package com.hp.action;

import com.hp.entity.User;
import com.hp.service.UserService;
import com.opensymphony.xwork2.ActionSupport;

public class UserAction extends ActionSupport {
	private int userId;
	private UserService us;
	private User user;
	public int getUserId() {
		return userId;
	}
	public void setUserId(int userId) {
		this.userId = userId;
	}
	public UserService getUs() {
		return us;
	}
	public void setUs(UserService us) {
		this.us = us;
	}
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	@Override
	public String execute() throws Exception {
		user = us.getUserById(userId);
		System.out.println(1);
		System.out.println(2);
		return SUCCESS;
	}
}
